<html>
<head><meta charset="utf-8"><title>api-guidelines deploy key · t-infra · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/index.html">t-infra</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html">api-guidelines deploy key</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208461789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208461789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208461789">(Aug 30 2020 at 00:54)</a>:</h4>
<p>I am moving the static site publish step for the api-guidelines repo from Travis to GitHub Actions (<a href="https://github.com/rust-lang/api-guidelines/pull/225">https://github.com/rust-lang/api-guidelines/pull/225</a>)</p>



<a name="208461826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208461826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208461826">(Aug 30 2020 at 00:54)</a>:</h4>
<p>would it be possible to get added as an admin on <a href="https://github.com/rust-lang/api-guidelines">https://github.com/rust-lang/api-guidelines</a> so that I can set up the deploy key as a repository secret?</p>



<a name="208461830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208461830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208461830">(Aug 30 2020 at 00:54)</a>:</h4>
<p>alternatively, would someone with admin access be willing to:</p>



<a name="208461835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208461835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208461835">(Aug 30 2020 at 00:54)</a>:</h4>
<p>generate a key: <code>ssh-keygen -t rsa -b 4096 -C libs@rust-lang.org -f gh-pages -N ""</code></p>



<a name="208461852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208461852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208461852">(Aug 30 2020 at 00:55)</a>:</h4>
<ul>
<li>add the public key as a deploy key in <a href="https://github.com/rust-lang/api-guidelines/settings/keys">https://github.com/rust-lang/api-guidelines/settings/keys</a></li>
</ul>



<a name="208461858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208461858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208461858">(Aug 30 2020 at 00:55)</a>:</h4>
<ul>
<li>add the private key as a repository secret in <a href="https://github.com/rust-lang/api-guidelines/settings/secrets">https://github.com/rust-lang/api-guidelines/settings/secrets</a></li>
</ul>



<a name="208461900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208461900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208461900">(Aug 30 2020 at 00:56)</a>:</h4>
<p>it should look like:<br>
<a href="/user_uploads/4715/ubmEYaYmMfKto8LsrNrt-xAh/Screenshot-from-2020-08-29-17-44-25.png">Screenshot-from-2020-08-29-17-44-25.png</a> <br>
<a href="/user_uploads/4715/FabHOZ7wjTuLVUg7t7SPaVel/Screenshot-from-2020-08-29-17-44-54.png">Screenshot-from-2020-08-29-17-44-54.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/ubmEYaYmMfKto8LsrNrt-xAh/Screenshot-from-2020-08-29-17-44-25.png" title="Screenshot-from-2020-08-29-17-44-25.png"><img src="/user_uploads/4715/ubmEYaYmMfKto8LsrNrt-xAh/Screenshot-from-2020-08-29-17-44-25.png"></a></div><div class="message_inline_image"><a href="/user_uploads/4715/FabHOZ7wjTuLVUg7t7SPaVel/Screenshot-from-2020-08-29-17-44-54.png" title="Screenshot-from-2020-08-29-17-44-54.png"><img src="/user_uploads/4715/FabHOZ7wjTuLVUg7t7SPaVel/Screenshot-from-2020-08-29-17-44-54.png"></a></div>



<a name="208461903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208461903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208461903">(Aug 30 2020 at 00:56)</a>:</h4>
<p>this setup matches what I have been using in <a href="https://github.com/serde-rs/docs">https://github.com/serde-rs/docs</a> for the past couple months</p>



<a name="208472664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208472664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208472664">(Aug 30 2020 at 07:16)</a>:</h4>
<p><span class="user-mention" data-user-id="119235">@David Tolnay</span> You do not have to use deploy keys or additional secrets when publishing to gh-pages from GHA.  GitHub automatically includes a <code>GITHUB_TOKEN</code> secret which has permission to push to the repository.  <a href="https://github.com/rust-lang/rustup/blob/master/.github/workflows/deploy-docs.yaml">Here</a> is an example of one I set up recently. There are many ways to accomplish that, but I preferred to stick with really basic manual git commands.</p>



<a name="208472768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208472768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Tolnay <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208472768">(Aug 30 2020 at 07:18)</a>:</h4>
<p>oh nice! thanks, will go with that</p>



<a name="208476568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/api-guidelines%20deploy%20key/near/208476568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/api-guidelines.20deploy.20key.html#208476568">(Aug 30 2020 at 09:27)</a>:</h4>
<p><span class="user-mention" data-user-id="119235">@David Tolnay</span> I’ve also written a <code>deploy-mdbook</code> action if you want something higher level.</p>
<div class="codehilite"><pre><span></span><code><span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Deploy mdBook</span>
<span class="nt">on</span><span class="p">:</span> <span class="p p-Indicator">[</span><span class="nv">push</span><span class="p p-Indicator">]</span>
<span class="nt">jobs</span><span class="p">:</span>
  <span class="nt">build</span><span class="p">:</span>
    <span class="nt">runs-on</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">ubuntu-latest</span>
    <span class="nt">steps</span><span class="p">:</span>
      <span class="p p-Indicator">-</span> <span class="nt">uses</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">actions/checkout@v2</span>
      <span class="p p-Indicator">-</span> <span class="nt">uses</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">XAMPPRocky/deploy-mdbook@v1.1</span>
        <span class="nt">with</span><span class="p">:</span>
            <span class="nt">token</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">${{ secrets.GITHUB_TOKEN }}</span>
</code></pre></div>


<p><a href="https://github.com/XAMPPRocky/deploy-mdbook">https://github.com/XAMPPRocky/deploy-mdbook</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>